#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2018-12-04 17:25
# @Author  : 少爷

score = int(raw_input('input score:\n'))
if score >= 90:
    grade = 'A'
elif score >= 60:
    grade = 'B'
else:
    grade = 'C'

print '%d belong to %s' % (score, grade)
